package eclipse.client.threadpool;
import eclipse.client.Database;
import eclipse.lib.sockets.ClientDataHandle;
import eclipse.util.*;
public class NetProcessThread extends ThreadedTimer 
{
	String netMsg;
	public void tick()
	{				
		if(Database.Socket == null)
			return;	//Do nothing until the required object is made.
		
		if(Database.Socket.isConnected())					
		{
			netMsg = Database.Socket.getString();
			ClientDataHandle.process(netMsg);			
		}					
	}	
	public NetProcessThread()	
	{		
		setName("Network Thread");
		setEnabled(true);		
		setInterval(1000/60);
		start();		
	}
}
